package com.yixia.pea.mapper;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yixia.common.utils.StringUtils;
import com.yixia.pea.domain.credit.LoansBank;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.util.List;

/**
* @author 35038
* @description 针对表【loans_bank】的数据库操作Mapper
* @createDate 2023-09-07 10:47:20
* @Entity com.yixia.pea.domain.credit.LoansBank
*/
public interface LoansBankMapper extends BaseMapper<LoansBank> {

    default List<LoansBank> selectPageList(LoansBank loansBank){
        LambdaQueryWrapper<LoansBank> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(StringUtils.isNotEmpty(loansBank.getBankId()), LoansBank::getBankId, loansBank.getBankId())
                .like(StringUtils.isNotEmpty(loansBank.getBankName()), LoansBank::getBankName, loansBank.getBankName())
                .eq(StringUtils.isNotEmpty(loansBank.getStatus()), LoansBank::getStatus, loansBank.getStatus())
                .eq(StringUtils.isNotEmpty(loansBank.getDelFlag()), LoansBank::getDelFlag, "0");
        return this.selectList(queryWrapper);
    }
}




